Skip to content

Conversation

@Tarquinen
Copy link
Collaborator

Summary

Session AI now decides what to prune directly via numeric IDs, eliminating the separate janitor LLM call.

Changes

  • Numeric ID system maps simple references (1, 2, 3) to provider tool IDs
  • <prunable-tools> list injected at end of conversation
  • Prune tool accepts array of IDs instead of reason string
  • Removed: janitor LLM, model-selector, pruning prompt

The session AI now decides what to prune via numeric IDs instead of a separate janitor LLM call.

- Add numeric ID mapping system for simple tool references (1, 2, 3...)
- Inject <prunable-tools> list at end of conversation
- Prune tool accepts array of IDs to remove
- Remove janitor LLM, model-selector, and pruning prompt
…ounts

- Add clearAllMappings() to id-mapping.ts for resetting module-level state
- Detect session changes in hooks.ts and clear ID mappings + tool cache
- Make API format handlers mutually exclusive (else if) to prevent double-processing
- Exclude protected tools from 'total' count in replacement logs
- Pass protectedTools set to trackNewToolResults functions for nudge frequency
- Restore model-selector.ts for LLM model selection with provider fallback
- Restore runLlmAnalysis() and replacePrunedToolOutputs() in janitor.ts
- Restore buildAnalysisPrompt() and minimizeMessages() in prompt.ts
- Restore pruning.txt prompt template
- Restore ModelInfo interface and state.model map for model caching
- Add model caching back to hooks.ts chat.params handler
- Remove dead code: getNumericIdsForActual, getNumericId, getAllMappings, hasMapping, getNextId
@Tarquinen Tarquinen merged commit 377919b into master Dec 3, 2025
1 check passed
Tarquinen added a commit that referenced this pull request Dec 3, 2025
Restore the helpful guidance that was shortened in PR #61, telling
subagents to continue with their work or provide final summary.
Tarquinen added a commit that referenced this pull request Dec 3, 2025
Restore the helpful guidance that was shortened in PR #61, telling
subagents to continue with their work or provide final summary.
@jorgenwh jorgenwh deleted the fix/tool-cache-case-sensitivity branch December 13, 2025 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants